import logging

import yagmail


def log_set():
    logging.basicConfig(level=logging.DEBUG,format='%(name)s_%(levelname)s_%(message)s',handlers=[
        logging.StreamHandler(),
        logging.FileHandler('log.txt')
    ])
def send_mail(a):
    mail=yagmail.SMTP(user='3192933068@qq.com',password='sxajwqyvomtpdfch',host='smtp.qq.com')
    mail.send(to='3192933068@qq.com',subject='测试报告主题',contents='这是测试报告',attachments=a)